package demo2;

public class Test {
    public static void main(String[] args) {
        int a = 200;
        Integer integer = Integer.valueOf(a);//手动装箱
        System.out.println(integer);
        Integer integer1 = new Integer(a);//手动装箱
        System.out.println(integer1);
        Integer integer2 = a;//自动装箱
        System.out.println(integer1);
        System.out.println("=============");
        int j = integer.intValue();//手动拆箱
        System.out.println(j);
        int jj = integer;//自动拆箱
        System.out.println(jj);
        System.out.println("===============");
        test();
    }
    public static void test() {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a == b);
        Integer c = 200;
        Integer d = 200;
        System.out.println(c == d);
    }
}
